﻿using System;
using System.Collections.Generic;
using System.Text;

namespace RDJTProtocolServer
{
    public class RdjtpStatus
    {
        public const int Ok = 1;
        public const int Created = 2;
        public const int Updated = 3;
        public const int BadRequest = 4;
        public const int NotFound = 5;
        public const int Error = 6;

        public static string GetText(int statusCode)
        {
            switch (statusCode)
            {
                case 1:
                    return $"{statusCode} Ok";
                case 2:
                    return $"{statusCode} Created";
                case 3:
                    return $"{statusCode} Updated";
                case 4:
                    return $"{statusCode} Bad Request";
                case 5:
                    return $"{statusCode} Not Found";
                case 6:
                    return $"{statusCode} Error";
                default:
                    throw new Exception("No such status code in RDJT Protocol definition");
            }
        }
    }
}
